Many electronic equipment are powered by DC power supplies normally converted from AC power supplies. FIG. 1 schematically shows a prior art AC/DC converter. As shown in FIG. 1, the AC/DC converter comprises a full-bridge rectifier 101 and a DC/DC converter 102. The full-bridge rectifier 101 is coupled to an AC power supply to convert an AC voltage VIN to a rectified voltage VDC. Then the DC/DC converter 102 converts the rectified voltage VDC to a DC voltage supplied to a load.
In FIG. 1, a X-cap (safety capacitor) CX is coupled between the AC power supply and the full-bridge rectifier 101 to reduce the EMI (Electro-Magnetic Interference) of the AC/DC converter. An input capacitor C1 is coupled in parallel with the full-bridge rectifier 101 to filter the rectified signal VDC and to store energy when necessary. In actual use, after the AC/DC converter is unplugged, an accident caused by the residual charge in the X-cap may happen. Thus, the X-cap CX should be discharged completely and in a timely manner when the AC/DC converter is unplugged. A detector detecting when the AC/DC converter is unplugged is needed to determine when the X-cap should be discharged.